package org.jsbd.boss.dao.impl;

import org.jsbd.boss.dao.IRetentTimesDao;
import org.jsbd.boss.domian.channel.RetentTimesConfig;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @desc
 * @Date 2018/9/27 14:00
 * @Author xupengcheng [xupengcheng@zhexinit.com]
 */
@Service
public class RetentTimesConfigDaoImpl extends CrackBaseDao implements IRetentTimesDao {

    @Override
    public void insert(RetentTimesConfig config){
        super.insert("qy_retent_times_config.INSERT_CONFIG", config);
    }

    @Override
    public List<RetentTimesConfig> selectConfigList(RetentTimesConfig config){
        return super.queryForList("qy_retent_times_config.SELECT_CONFIG_LIST", config);
    }

    @Override
    public void delete(List<RetentTimesConfig> configList){
        for(RetentTimesConfig config : configList){
            super.delete("qy_retent_times_config.DELETE_CONFIG", config);
        }
    }

    @Override
    public void saveConfigList(List<RetentTimesConfig> configList){
        super.batchInsert("qy_retent_times_config.INSERT_CONFIG", configList);
    }

}
